package com.y.architecture.base_header;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.y.architecture.R;
import com.y.architecture.base.BaseActivity;

/**
 * Created by youjingjing on 2017/11/24.
 */

public abstract class BaseHeaderActivity extends BaseActivity implements IBaseHeaderContact.IBaseHeaderView {
    protected Toolbar mToolbar;
    private BaseHeaderHelper mBaseHeaderHelper;

    @Override
    public void init(Bundle savedInstanceState) {
        super.init(savedInstanceState);
        initHeader(savedInstanceState);
    }

    @Override
    public void initHeader(Bundle savedInstanceState) {
        mBaseHeaderHelper = new BaseHeaderHelper(this);

        mToolbar= mBaseHeaderHelper.initToolbar();
//        if (mToolbar!=null) {
//            setSupportActionBar(mToolbar);
//            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//        }
    }

    @Override
    public int getToolbarId() {
        return R.id.bs_toolbar;
    }

    @Override
    public boolean isShowToolbar() {
        return true;
    }

    @Override
    public void onToolbarClicked(View view) {

    }
}
